Return to doc.sitecore.com

Documentation

 

1.  Description

The Text Web Control is designed to display the "text" field value  in the Sitecore content tree. The appearance of the displayed text can be controlled via the Web Control’s properties. The Text Web Control can be setup to display the static text as well.   

Please refer to the Web Controls article for more information about creating Web Controls.

 

2.  Installation Guide

The ‘Text’ Web Control is distributed as a standard Sitecore package; hence in order to start using it, you should install the package. Please refer to the ' Installing Modules and Packages ' article if you are not familiar with the standard Sitecore Packager tool.  

After the package installation, you will see the Text Web Control in the list of renderings.   

Thus, you will be able to place it on a (sub)layout or a link via placeholder as another rendering.  

No modifications are required to use this Web Control, but you can modify the Text  setting (for example, tag prefix) by editing the following Item:

/sitecore/layout/Renderings/Text  

 

3.  User Manual

The ‘Text’ is a common Web Control, thus you will be able to work with it like with any other rendering.   

To set control properties, double-click it and you’ll see the configuration window. Open the Attributes tab and set properties as described in the example below.   

 

Valid Attributes:

 

StaticText

Type: System.String

Property value:

The text which should be rendered.

 

TextClass

Type: System.String

Property value:

The CSS class of the text.

 

TextField  

Type: System.String

Property value:

The name of the field containing the text.

Note:

If the StaticText property is initialized, then the TextField property is ignored.

 

TextStyle  

Type: System.String

Property value:

The CSS style of the text.